#ifndef _SYS_INDEX_ERR_H_
#define _SYS_INDEX_ERR_H_

#include "Err.h"
#include "SysTypes.h"

#define INDEX_ERR_VTABLE(self)   ((IndexErrVTable*)((FanObj*)self)->vtable)


extern Type*    IndexErr_classType;
extern VTable*  IndexErr_classVTable;


/* [sys::IndexErr] Attributes */
struct IndexErr
{
  Err           super;
};


/* [sys::IndexErr] Virtual-table */
typedef struct IndexErrVTable
{
  ErrVTable     super;
} IndexErrVTable;


/* [sys::IndexErr] Methods and fields */
void            IndexErr_make_0(IndexErr* self);
void            IndexErr_make_1(IndexErr* self, Str* msg);
void            IndexErr_make(IndexErr* self, Str* msg, Err* cause);


/* [sys::IndexErr] Extra methods */
IndexErr*       IndexErr_new(Str* msg, Err* cause);
IndexErr*       IndexErr_newWithFormattedMsg(const char* msgFormat, ...);
IndexErr*       IndexErr_newWithIndex(Int index);
IndexErr*       IndexErr_newWithRange(Range* range);


/* [sys::IndexErr] Type-system functions */
Type*           IndexErr_initType(void);
VTable*         IndexErr_initVTable(void);
void            IndexErr_initStatic(void);


#endif
